<?php
namespace App\Jobs;

use Exception;
use Illuminate\Support\Facades\Log;

class ProcessTest extends Job
{
    /**
     * 任务可尝试的次数
     *
     * @var int
     */
    public $tries = 3;
    
    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        //throw new Exception("Error Processing Request", 1);

        //success
        Log::channel('v1api')->info('queue succ');
    }

    /**
     * 队列失败记日志
     */
    public function failed(\Throwable $e)
    {
        Log::channel('v1api')->emergency('queue failed.......');
    }
}
